package com.mall.server;

import com.mall.dubbo.api.SmsCouponApi;
import com.mall.dubbo.api.SmsFlashPromotionSessionApi;
import com.mall.model.domain.SmsCoupon;
import org.apache.dubbo.config.annotation.DubboReference;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = ServerApplication.class)
public class Rtest {

    @DubboReference
    private SmsFlashPromotionSessionApi smsFlashPromotionSessionApi;

    @DubboReference
    private SmsCouponApi smsCouponApi;

    @Test
    public void sr() {

        SmsCoupon smsCoupon = new SmsCoupon();
        smsCoupon.setCount(1);
        Long aLong = smsCouponApi.saveCoupon(smsCoupon);
        System.out.println(aLong);
    }

}
